#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include<QGraphicsPixmapItem>//图形元素
#include<QGraphicsView>//视图
#include<QGraphicsScene>//场景
#include<QList>//链表
#include"enemy.h"
#include"player.h"
#include"bullet.h"
#include<QMediaPlayer>//媒体播放器类

//Graphics图形
//元素组成--->场景--->视图--->窗口
namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();

    static Widget* widget;

    //按键事件
    void keyPressEvent(QKeyEvent* event);
    void keyReleaseEvent(QKeyEvent* event);

private:
    Ui::Widget *ui;


};

#endif // WIDGET_H
